package com.example.backend.service.mysql.user;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.backend.dto.request.AddressDto;
import com.example.backend.dto.request.PageUserDto;
import com.example.backend.entitly.mysql.user.UserAddresses;

/**
 * @author 1
 * @description 针对表【user_addresses(用户地址表)】的数据库操作Service
 * @createDate 2025-06-04 09:01:52
 */
public interface UserAddressesService extends IService<UserAddresses> {


    Page<UserAddresses> getAddressList(PageUserDto pageUserDto);

    boolean saveByAddress(AddressDto addressDto);

    UserAddresses getByDefault(Integer userId);

    boolean countByAddress(Integer userId);

    boolean removeByAddress(Integer addressId, Integer userId);

    boolean updateByAddress(AddressDto addressDto);
}
